package cn.autumnorange.app.user.api;

import cn.autumnorange.app.common.dto.ResultDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient(
        value = "app-user-provider",
        //        fallback = AccountServiceImpl.class
        fallbackFactory = AccountFallbackFactory.class
        //        ,
        //        configuration = FeignHeaderInterceptor.class
)
public interface MoneyService {

    @PutMapping(value = "/{version}/{money}/add")
    ResultDto<MoneyDto> add(
            @PathVariable(value = "version") Long version, @PathVariable(value = "money") Long money);

    @GetMapping(value = "/getmoney")
    ResultDto<MoneyDto> getmoney();

    @GetMapping(value = "/resetacc")
    ResultDto<MoneyDto> resetacc();
}
